//
//  UIBarButtonItem-extension.swift
//  sxwb
//
//  Created by TianDu on 2016/11/14.
//  Copyright © 2016年 TianDu. All rights reserved.
//

import UIKit


extension UIBarButtonItem {
    
    convenience init(image:String) {
        
//        self.init()
        
        let btn = UIButton()
        
        btn.setImage(UIImage(named:image), for: .normal)
        btn.setImage(UIImage(named:image+"_highlighted"), for: .selected)
        btn.sizeToFit()
//        self.customView = btn
        self.init(customView:btn)
    }
}
